package com.nsgf.library.data.bean;

import com.nsgf.library.utils.StringUtil;
import com.nsgf.library.widget.prckerview.TimePickerView;
import com.nsgf.library.widget.prckerview.model.IPickerViewData;

import java.util.ArrayList;
import java.util.List;

public class VideoListBean implements IPickerViewData {

    private String facilityName;
    private String projectCodeDesc;
    private boolean checked;
    private List<ListBean> list;
    private String area;

    public String getFacilityName() {
        return facilityName;
    }

    public void setFacilityName(String facilityName) {
        this.facilityName = facilityName;
    }

    public List<ListBean> getList() {
        if (null == list)
            list = new ArrayList<>();
        return list;
    }

    public void setList(List<ListBean> list) {
        this.list = list;
    }

    public String getProjectCodeDesc() {
        return projectCodeDesc;
    }

    public void setProjectCodeDesc(String projectCodeDesc) {
        this.projectCodeDesc = projectCodeDesc;
    }

    public boolean isChecked() {
        return checked;
    }

    public void setChecked(boolean checked) {
        this.checked = checked;
    }

    @Override
    public String getPickerViewText() {
        return getProjectCodeDesc();
    }

    public String getArea() {
        return StringUtil.isEmpty(area) ? "" : area;
    }

    public void setArea(String area) {
        this.area = area;
    }

    public static class ListBean implements IPickerViewData {

        private String facilityType;
        private String facilityName;
        private String deviceCode;
        private String deviceName;
        private String coordinates;
        private String callingMode;
        private String facilityTypeDesc;
        private List<ListBean> list;
        private boolean checked;
        private String videoSource;
        private String channelId;

        public String getFacilityType() {
            return facilityType;
        }

        public void setFacilityType(String facilityType) {
            this.facilityType = facilityType;
        }

        public String getFacilityName() {
            return StringUtil.isEmpty(facilityName) ? getFacilityTypeDesc() : facilityName;
        }

        public void setFacilityName(String facilityName) {
            this.facilityName = facilityName;
        }

        public String getDeviceCode() {
            return deviceCode;
        }

        public void setDeviceCode(String deviceCode) {
            this.deviceCode = deviceCode;
        }

        public String getDeviceName() {
            return StringUtil.isEmpty(deviceName) ? "" : deviceName;
        }

        public void setDeviceName(String deviceName) {
            this.deviceName = deviceName;
        }

        public String getCoordinates() {
            return coordinates;
        }

        public void setCoordinates(String coordinates) {
            this.coordinates = coordinates;
        }

        public String getCallingMode() {
            return callingMode;
        }

        public void setCallingMode(String callingMode) {
            this.callingMode = callingMode;
        }


        public String getFacilityTypeDesc() {
            return StringUtil.isEmpty(facilityTypeDesc) ? "" : facilityTypeDesc;
        }

        public void setFacilityTypeDesc(String facilityTypeDesc) {
            this.facilityTypeDesc = facilityTypeDesc;
        }

        public List<ListBean> getList() {
            return list;
        }

        public void setList(List<ListBean> list) {
            this.list = list;
        }

        @Override
        public String getPickerViewText() {
            return StringUtil.isEmpty(getDeviceName()) ? getFacilityTypeDesc() : getDeviceName();
        }

        public boolean isChecked() {
            return checked;
        }

        public void setChecked(boolean checked) {
            this.checked = checked;
        }

        public String getVideoSource() {
            return videoSource;
        }

        public void setVideoSource(String videoSource) {
            this.videoSource = videoSource;
        }

        public String getChannelId() {
            return channelId;
        }

        public void setChannelId(String channelId) {
            this.channelId = channelId;
        }
    }
}
